﻿using System.Collections.Generic;
using YooAssetsSystem.Fsm;
using YooAsset;

namespace YooAssetsSystem.Patch
{
    public class PatchNodeData : StateData
    {
        public string updateResUrl; //资源更新路径
        public string package; //更新资源包名
        public string version; //版本号
        public bool pauseDownload; //暂停下载
        public DownloaderOperation downloader; //下载器 

        public PatchNodeData(string updateResUrl)
        {
            this.updateResUrl = updateResUrl;
        }
        public override void Clear()
        {
            downloader?.CancelDownload();
            updateResUrl = default;
            version = default;
            package = default;
            pauseDownload = default;
            downloader = default;
        }
    }
}